<template>
  <el-dialog title="获取密码" :model-value="visible" width="700px" :fullscreen="mobile" class="dialog-content-clear">
    <el-alert title="说明：使用开门方式为密码时，需定期用电子钥匙开门以获取锁电量和开门记录，建议使用客户端好房享住微信小程序开门。" type="warning" :closable="false" />
    <el-row class="ph-16 mt20 mb20">
      <el-col :span="6">劲叶公寓0101</el-col>
      <el-col :span="6">密码：335623</el-col>
      <el-col :span="12">有效期：2024/03/10 15:00 - 2024/03/10 16:00</el-col>
    </el-row>
    <template #footer>
      <span class="dialog-footer">
        <el-button type="primary" @click="handleMessage">发送短信</el-button>
        <el-button @click="handleEmail">邮箱发送</el-button>
      </span>
    </template>
  </el-dialog>
</template>
<script setup name="CreatePasswordDl">
import useAppStore from '@/store/modules/app'

const emit = defineEmits()
const props = defineProps({
  visible: {
    type: Boolean,
    default: false
  }
})

const mobile = computed(() => useAppStore().device === 'mobile')

function handleMessage() {
  emit('message')
}

function handleEmail() {
  emit('email')
}
</script>
